/*
 * Copyright 2003-2006 (c) Live Media Pty Ltd. <argot@einet.com.au> 
 *
 * This software is licensed under the Argot Public License 
 * which may be found in the file LICENSE distributed 
 * with this software.
 *
 * More information about this license can be found at
 * http://www.einet.com.au/License
 * 
 * The Developer of this software is Live Media Pty Ltd,
 * PO Box 4591, Melbourne 3001, Australia.  The license is subject 
 * to the law of Victoria, Australia, and subject to exclusive 
 * jurisdiction of the Victorian courts.
 */

%module(package = "argot") dictionary

%import "type.i"

%{
	#include "Types.h"
	#include "dictionary/Dictionary.h"
	#include "dictionary/DictionaryTypes.h"
	#include "dictionary/TypeMapMarshaller.h"
%}

%include exception.i
%include "argot_exception.i"


// ------------------------------------------------------------------------------------------------
%exception _py_read_dictionary
{
	ArgotConditionalExc( result != TYPE_OK, SWIG_ValueError, "Error in reading dictionary" )
}

%include "dictionary/Dictionary.h"


%insert_read_callback;

%read_dictionary_callback

// ------------------------------------------------------------------------------------------------

%exception dictionary_types_init
{
	ArgotConditionalExc (result != TYPE_OK, SWIG_ValueError, "error initing dictionary types" )
}

%include "dictionary/DictionaryTypes.h"

// ------------------------------------------------------------------------------------------------

%exception type_map_write
{
	ArgotNullExc( SWIG_ValueError, "Error in marshalling type map" );
}

%include "dictionary/TypeMapMarshaller.h"

// ------------------------------------------------------------------------------------------------
